<include file="Public:top" />
	<body>
<include file="Public:head" />
		<div class="wrap container cl">
			<!--商品详细-->
			<div class="mains">
				<div class="piece jiu_goods">
					<div class="piece_box">
						<div class="jiu_bd jiu_top fl">
							<div class="item_containt">
								<div class="jiu_goodsinfo">
									<div class="goods_con" znid="101z3l">
										<div class="pic">
											<img src="{:$item['pict_url']}_400x400" width="400px" height="400px">
										</div>
										<div class="goods_detail">
													<h3 style="height: 21px; overflow: hidden;">	<a>
													{$item.title}</a></h3>
											<div class="desc"></div>

											<div class="item-like">
												<div class="price_tag"><i>￥</i>
													<if condition="$item.quan">
														{:$item['zk_final_price']-$item['quan']}
														<else/>
														{$item.zk_final_price}
													</if>
												
					 <if condition="($visitor or $isfanli eq 0) and $isfanli neq 2 && $item['rate']">
	                   <span class="ori_price" style="text-decoration: none;">预计返￥
	                   		{$item.rate}
	                  </span>
	                   <else/>
	                  <span class="ori_price">￥{$item.zk_final_price}</span>
	                   </if>
												</div>
												<div class="volume_tag fr">已有 <strong>{$item.volume}</strong> 人在抢购该商品</div>
											</div>
											<dl class="item-last-time"> <dt></dt>
												<dd class="timer" id="end_date_0" data-time="{$item.coupon_end_time}"></dd>
											</dl>
											<div class="text-wrap">
												<if condition="$item.isq eq '1'">
													<span class="text-wrap-span">
													已领券<i>{$item.Quan_receive}</i>张，手慢无
													</span>
												</if>
												<span>已有<i>{$item.volume}</i>人购买</span>
											</div>
											<div class="buy-step clearfix">
											
											<div class="buy-step-text">购买流程</div>
												
												<if condition="$item.quanurl">
													<div class="buy-step-first">
														<span>
															<i>领券可省</i>
															<b _hover-ignore="1">{$item.quan}元</b>
														</span>
 <if condition="$islogin && !$visitor">
<a rel="nofollow" class="coupon-btn islogin" href="javascript:;"  title="领券后请点击右边按钮下单" _hover-ignore="1">点击领取</a>
<else/>
<a rel="nofollow" class="coupon-btn" href="{$item.quanurl}" target="_blank" title="领券后请点击右边按钮下单" _hover-ignore="1">点击领取</a>
</if>


													</div>
													<div class="double-arrow">
														<span style="margin-left: -12px;"></span>
													</div>
												</if>
												<input type="hidden" id="Pid" value="{$item.id}" />
												<input type="hidden" id="up_time" value="{$item.up_time}" />
												<a  rel="nofollow" 
													 <if condition="$islogin && !$visitor">
													 	class="buy-step-sec buy-btn islogin"  href="javascript:;"
													 	<else/>
													 class="buy-step-sec buy-btn" href="{$item.quanurl}"
													 </if>
													   data-itemid="{$item.num_iid}" target="_blank">去
													<if condition="$item.user_type eq '0' ">淘宝
														<else/>天猫</if>下单</a>
												<if condition="$item.quanurl">	
													<div class="code">
													<p>手机淘宝扫码领券购买<img src="__STATIC__/tqkpc/images/code.jpg" width="20" height="20"></p>
													<img src="{:U('item/qrcode')}?dataurl={:base64_encode($item['quanurl'])}" width="120" height="120">
												</div>
												</if>
											</div>

											<div style="width: 100%; clear: both; padding-top: 10px;"></div>
											<div class="shareto" style="clear: both; width: 95%;">
												如果您喜欢此宝贝，记得分享给您的朋友，一起享优惠。 【<label id="copy" class="blue btn">复制优惠</label>】 【<label id="jubao" rel={$item.num_iid} class="blue">举报违规</label>】
											</div>

										</div>
									</div>
<if condition="$desc">		
<div style="clear: both; padding-top: 30px;"></div>
<div id="images-content" style="text-align: center;"></div>
</if>
								</div>

								<div class="jiu_shi jiu_item">
									<h3><img src="__STATIC__/images/jinpintuijian.png" /></h3>
									<div class="goods-list main-container">
										<ul class="clearfix">
											<yh:item type="orlike" cid="$item['cate_id']">
												<volist name="items_list" id="val" key="i" mod="3">
													<li style="margin-right:8px;">
														<a href="{:U('/item/',array('id'=>$val['id']))}{$trackurl}" class="img cnzzCounter" target="_blank" data-cnzz-type="1" data-cnzz="{$val['id']}">
															<img src="{$val['pic_url']}_400x400" alt="">
														</a>
														<div class="padding">
															<a target="_blank" href="{:U('/item/',array('id'=>$val['id']))}{$trackurl}" class="title clearfix cnzzCounter" data-cnzz-type="1" data-cnzz="{$val['id']}">
																{$val.title}
															</a>
															<div class="coupon-wrap clearfix" >
								                            	<p>
									                            	<span>券后价<font style="font-size: 18px;">{$val.coupon_price}</font>元</span>
									                              <span style="float: right;"><if condition="$val.shop_type eq 'C' ">淘宝</if><if condition="$val.shop_type eq 'B' ">天猫</if><font color="red">{$val.price}</font>元</span>
									                            </p>
									                            <p>
									                                <if condition="$val.shop_type eq 'C' "><i class="taobao"></i></if>
																<if condition="$val.shop_type eq 'B' "><i class="tmall"></i></if>月销量  <span class="num">{$val.volume}</span>,
																<span>优惠券<font color="red">{$val.quan}</font>元</span>
									                            </p>        
								                            </div>
														</div>
													</li>

												</volist>
											</yh:item>
										</ul>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>

<include file="Public:foot" />
<script language="JavaScript">
<if condition="$desc">			
$(function(){
	var num_iid="{:$item['num_iid']}";
    $.ajax({
        url:'https://h5api.m.taobao.com/h5/mtop.taobao.detail.getdesc/6.0/?data={"id":"'+ num_iid +'"}',
        type:'get',
        dataType:'jsonp',
        success: function(data){
        	var imglist=data.data.pcDescContent;
       imglist = imglist.replace('<img class="desc_anchor" id="desc-module-1" src="//assets.alicdn.com/kissy/1.0.0/build/imglazyload/spaceball.gif">','');
        	$('#images-content').html(imglist);
        }
    })
 });
</if>	
	
	$('.islogin').on('click', function(e) {
			layer.alert('请登录后再领券！',function(){
			
			window.location.href='{:U("login/index")}';
				
			});
		});
;(function() {
    var pageCtrl = {
        _codeGenerator: function(el) {
            $.ajax({
                url: '{:U('dwz/create')}',
                type: 'post',
                dataType : 'json',    
                data: {
                    url : '{$item.quanurl}'
                },
                async: false, 
                success: function(res) {
                  el.data('url', res.result);
                }
            });
        },

        _clip: function() {
            var _self = this,
            clipboard = new Clipboard('#copy', {
                text: function(el) {
                    var $el = $(el);
                    _self._codeGenerator($el); 
return '{$item.title}【包邮】\n'+
'【<if condition="$item.shop_type eq 'C' ">淘宝<else/>天猫</if>售价】{$item.zk_final_price}元\n'+
'【券后价】{$item.coupon_price}元 \n'+
'【下单链接】'+$el.data('url')+'\n'+
'-----------------\n'+
'或者FU.制这条信息 {$item.kouling} ，打开「手机啕.宝」即可领券购买';
                }
            });
            clipboard.on('success', function(e) {
            	  layer.msg('复制成功,快去分享吧！',{time:1000});
                      
            });
        },
        init: function() {
            this._clip();
        }
    };
    $(function() {
        pageCtrl.init();
    });            
})();
</script>


	</body>
</html>